package com.qiyu.tech.gateway;

import com.qiyu.core.cache.redis.annotation.CacheDataSource;
import com.qiyu.datasource.annotation.AppDataSource;
import com.qiyu.datasource.enums.DatasourceConfigEnum;
import com.qiyu.datasource.interceptor.QiyuInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;

import static com.qiyu.core.cache.redis.config.RedisEnvConstatns.RedisEnvEnum.DEFAULT_DB;

/**
 * @Author linhao
 * @Date created in 9:45 下午 2021/3/16
 */
@SpringBootApplication(scanBasePackages = "com.qiyu.*")
@Import(QiyuInterceptor.class)
//@CacheDataSource(cacheType = DEFAULT_DB)
@AppDataSource(datasourceType = {DatasourceConfigEnum.CLOUD_DB},defaultType = DatasourceConfigEnum.CLOUD_DB)
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
        System.out.println("======== 黑名单服务启动 ========");
    }
}
